import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router';

const routes = [
    {
        path: '/',
        redirect: '/screen',
    },
    {
        path: '/screen',
        name: 'Screen',
        component: () => import('@/views/screen/HomeView.vue'),
    },
    {
        path: '/add',
        name: 'add',
        component: () => import('@/views/withstand/add.vue'),
    },
    {
        path: '/test',
        name: 'test',
        component: () => import('@/views/withstand/test.vue'),
    },
    {
        path: '/list',
        name: 'list',
        component: () => import('@/views/withstand/list.vue'),
    },
];

const router = createRouter({
    history: createWebHashHistory(import.meta.env.BASE_URL),
    routes,
});

router.beforeEach((to, from, next) => {
    next();
});

export default router;